package com.authority.service.impl;

import com.authority.entity.User;
import com.authority.mapper.UserMapper;
import com.authority.service.UserService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author MINGHUI
 * @since 2023-10-13
 */
@Service
@Transactional
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Override
    public User findByUserName(String userName) {
        return baseMapper.selectOne(new QueryWrapper<User>().eq("username",userName));
    }
}
